<ul class="ui-tiled" id="navbar">
    <li><a data-href="/rest/wx/usercenter" id="nav_uc"><span class="navicon user"></span>个人中心</a></li>
    <li><a data-href="/rest/wx/cardList" id="nav_cl"><span class="navicon history"></span>销售记录</a></li>
    <li><a data-href="/rest/wx/operorder" id="nav_oo"><span class="navicon buy"></span>碎屏服务</a></li>
</ul>

<script>
    (function () {
        if(location.href.indexOf('usercenter')!=-1){
            $('#nav_uc').addClass('cur').attr('href','javascript:void(0)');
        }else if(location.href.indexOf('cardList')!=-1){
            $('#nav_cl').addClass('cur').attr('href','javascript:void(0)');
        }else if(location.href.indexOf('operorder')!=-1){
            $('#nav_oo').addClass('cur').attr('href','javascript:void(0)');
        }

        $('#navbar').on('tap','a',function () {
            var href = $(this).data('href');
            if($(this).hasClass('cur')){
                return;
            }
            juq.showLoading();
            location.href = href+'?_='+Math.random();;
            setTimeout(function () {
                juq.hideLoading();
            },3000);
        });
    })();
</script>